package exception;

public class ThrowsDemo {
    public static void main(String[] args) {
        System.out.println("开始");
        try{
            Person p = new Person();
            p.setAge(-10);
            System.out.println("此人的年龄的是："+p.getAge());
        }catch(Exception e){
            e.printStackTrace();
            System.out.println("出现异常");
        }
        System.out.println("结束");
    }
}
